﻿USE StrongHold
GO

SELECT * FROM OrderMaster

SELECT * 
FROM OrderMaster
order by OrderDate desc

SELECT * FROM Item 
order by Rate asc-0

SELECT LEFT ('International', 2)

SELECT 'Hóa đơn' + OrderNo as [hóa đơn]
FROM OrderMaster

SELECT 'Kính gửi quý công ty ' + CName
From Customer

SELECT distinct ItemCode FROM OrderDetails

SELECT TOP 50 percent OrderNo from OrderMaster 

SELECT TOP 2 * From Item order by Rate desc

SELECT CName, CPhone
INTO DanhSachGoiDien
FROM Customer

SELECT * FROM DanhSachGoiDien

SELECT * FROM OrderDetails
where ItemCode = 'rksk-t' or ItemCode = 'rksk-b'
--where ItemCode in('rksk-t', 'rksk-b')


SELECT ItemCode, SUM(Qty) FROM OrderDetails
group by ItemCode
having ItemCode like 'RKSK-%'